×

Subscribe to newsletter

subscribe to our weekly newsletter to get notified with latest story and article Subscribe now!




PLC BLOG | RSLogix Math Instructions
Share on Facebook Share On Twitter Share on LinkedIn Share on Whatsapp


RSLogix 500 Math Instructions

these instruction are output instruction and perfom aritmatic operation such as addition, subtruction, multiplication, divison etc. The majority of the instructions take two input values, perform the specified arithmetic function, store the result at specified or assigned address. result of the operation exceeds the allowable value, an overflow or underflow bit is set this os called Arithmetic Status Bits. The arithmetic status bits are in word 0 bits 0-3 in the processor status file.
  • S:0/0 : Carry (C)
  • S:0/1 : Overflow (O)
  • S:0/2 : Zero (Z)
  • S:0/3 : Sign (S)
    parameter:
  • Source is the address of the values. This can be word addresses or constants values. for example N7:0, 12 etc.
  • Destination is the address of the result same data type as source.
  • data type same source as well as destination.


ADD , Addition Instructions

When rung conditions are true, this output instruction add Source A and Source B values and stores the result of addition into the destination address. Source A and Source B can either be constant values or address.

rslogix 500 Addition Instructions

    if input I:0/3 is set 1 value of source A N7:0 and Source B N7:1 are added and result is stored in Dest N7:2.


SUB, Subtract instruction

When rung conditions are true,SUB instruction subtract value of source B from another value of source A and place the result in the dest address. Source A and Source B can either be values or addresses that contain values.

rslogix 500 Subtract Instructions

    if input I:0/3 is set 1 value of source A N7:0 and Source B N7:1 are added and result is stored in Dest N7:2.


MUL, Multiplication instruction

When rung conditions are true,multiply MUL instruction multiply value of source B from another value of source A and place the result in the dest address. Source A and Source B can either be values or addresses that contain values.

rslogix 500 Multiplication  Instructions

    if input I:0/8 is set 1 value of source A N7:0 and Source B N7:1 are multiply and result is stored in Dest N7:4.


DIV, Divide instruction

When rung conditions are true,Divide DIV instruction Divide value of source B from another value of source A and place the result in the dest address. Source A and Source B can either be values or addresses that contain values.

rslogix 500 Divide Instructions

    if input I:0/7 is set 1 value of source A N7:0 and Source B N7:1 are Divide and result is stored in Dest N7:4.


SQRT, Square Root instruction

When rung conditions are true, this output instruction calculates the square root of the absolute value of the source and places the rounded result in the destination.

rslogix 500 Square Root Instructions

    if input I:0/6 is set 1, this instruction calculate Square Root of source and place in the destination N7:6.


NEG, Negate instrucntion

When rung conditions are true, this instrucntion change the sign of source value and store in destination address. for example if source value is 122 than destination store -127.

rslogix 500 Negate instrucntion Instructions

    if input I:0/5 is set 1, this instruction change the sign of source value and place in destination.


 
Share on Facebook Share On Twitter Share on LinkedIn Share on Whatsapp


Suggested Post


 
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21

comment